:root {
  --primary-color: #1a73e8;
  --border-color: #ddd;
  --background-gray: #f8f9fa;
  --text-gray: #5f6368;
  --logo-blue: #4285f4;
  --logo-orange: #ff7043;
}

#root {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem;
  text-align: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: 40px;
}

.logo-ring {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  position: relative;
  background: conic-gradient(
    from 90deg,
    var(--logo-blue) 0deg 180deg,
    var(--logo-orange) 180deg 360deg
  );
  transform: rotate(-45deg);
  transition: transform 0.3s ease;
}

.logo-ring:hover {
  transform: rotate(315deg);
  cursor: pointer;
}

.logo-ring::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  background-color: white;
  border-radius: 50%;
  transition: width 0.3s ease, height 0.3s ease;
}

.logo-ring:hover::before {
  width: 20px;
  height: 20px;
}

.logo-text {
  font-size: 22px;
  font-weight: 500;
  color: var(--primary-color);
  transition: color 0.3s ease;
}

.logo:hover .logo-text {
  color: var(--logo-blue);
}

.logo:hover {
  filter: drop-shadow(0 0 2em #646cffaa);
}
.logo.react:hover {
  filter: drop-shadow(0 0 2em #61dafbaa);
}

@keyframes logo-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: no-preference) {
  a:nth-of-type(2) .logo {
    animation: logo-spin infinite 20s linear;
  }
}

.card {
  padding: 2em;
}

.read-the-docs {
  color: #888;
}

.translator-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

.header {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-color);
}

.nav-tabs {
  display: flex;
  gap: 20px;
}

.tab {
  border: none;
  background: none;
  padding: 8px 16px;
  cursor: pointer;
  color: var(--text-gray);
  font-size: 14px;
  border-radius: 4px;
}

.tab.active {
  color: var(--primary-color);
  background-color: #e8f0fe;
}

.translation-box {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.language-bar {
  display: flex;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  gap: 16px;
}

.language-selector select {
  padding: 8px 24px 8px 12px;
  border: none;
  background-color: transparent;
  font-size: 14px;
  color: var(--text-gray);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 4px center;
  background-size: 16px;
}

.swap-btn {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 50%;
}

.swap-btn:hover {
  background-color: #e8f0fe;
}

.translation-area {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background-color: var(--border-color);
}

.input-section,
.output-section {
  background-color: white;
  padding: 16px;
  position: relative;
}

textarea {
  width: 100%;
  min-height: 150px;
  border: none;
  resize: none;
  font-size: 16px;
  line-height: 1.5;
  color: #333;
  background: transparent;
}

textarea:focus {
  outline: none;
}

textarea::placeholder {
  color: var(--text-gray);
}

textarea.error {
  color: #d32f2f;
  background-color: #ffebee;
}

.input-tools,
.output-tools {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: flex;
  gap: 8px;
}

.input-tools button,
.output-tools button {
  padding: 6px 16px;
  border: none;
  border-radius: 4px;
  background-color: white;
  color: var(--text-gray);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.input-tools button:hover,
.output-tools button:hover {
  background-color: var(--background-gray);
}

.input-tools button:disabled,
.output-tools button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: #f5f5f5;
}

.input-tools button:last-child {
  background-color: var(--primary-color);
  color: white;
}

.input-tools button:last-child:hover {
  background-color: #1557b0;
}

@media (max-width: 768px) {
  .translator-container {
    padding: 1rem;
  }
  
  .translation-box {
    padding: 1rem;
  }
}
